Vector Notation of a Line

There is a better way to write the equation of a line from two points. It is better because
  1. it does not involve a slope which could go to infinity if the line becomes vertical and
  2. it does not involve any computation in order to just write the equation and most importantly,
  3. it applies to multiple dimensions - especially 3-dimensions.

Method 1

Let two points be $P$ and $Q$. Then the line is $$\left(\begin{array}{c}x\\y\end{array}\right)=(1-t)\cdot\left(\begin{array}{c} P_{x}\\ P_{y} \end{array}\right)+t\cdot\left(\begin{array}{c} Q_{x}\\ Q_{y} \end{array}\right)\qquad t\in\mathbb{R}$$ It does not get any easier than this. Let's pick any two points. $P=(2,1)$ and $Q=(3,5)$. In figure [Vector-Line-equation], the line on which these two points will lie is $$\left(\begin{array}{c} x\\ y \end{array}\right)=(1-t)\cdot\left(\begin{array}{c} 2\\ 1 \end{array}\right)+t\cdot\left(\begin{array}{c} 3\\ 5 \end{array}\right)\qquad t\in\mathbb{R}$$ $$\left(\begin{array}{c} x\\ y \end{array}\right)=P+t(Q-P)\left(\begin{array}{c} x\\ y \end{array}\right)=\left(\begin{array}{c} 2\\ 1 \end{array}\right)+t\left(\begin{array}{c} 1\\ 4 \end{array}\right)$$

Vector Line Eq.png
Vector Line equation. The equation will display in parametric form. All of the formulas describe the same line.
 

Method 2

Recalling that a vector is just a tuple without commas. Given points $P(P_{x},P_{y})$ and $Q(Q_{x},Q_{y})$, the line connecting them may be instantly written in vector notation as in equation $\eqref{EQ 1}$. At first glance, this seems to be one iota more difficult than method 1, but it has some advantages. When we write out the elements of the vector, regardless of notation, then everyone can see that a vector is being used. But sometimes, we will have a symbol, for example $\mathbf{r}$, which we intend to be a vector, but we do not need to show its elements. In that case, we have to somehow denote that a vector is intended. There are several conventions that are widely used to denote a vector. One way is to decorate the vector symbol with a small arrow above it, or to use boldface type. Yet another way is to use upper case and bold to indicate a vector, but there has to be something. There will be a mix of vectors and scalers in the same equations. Scalers will not have any decoration. In this chapter, we will not perform any complicated vector operations. Still, we will remember that vector addition and subtraction is performed between like elements and that scalers multiply into all elements. $$\mathbf{r}=\left[\begin{array}{c} x\\ y \end{array}\right]=\left(\begin{array}{c} P_{x}\\ P_{y} \end{array}\right)+t\cdot\left[\left(\begin{array}{c} Q_{x}\\ Q_{y} \end{array}\right)-\left(\begin{array}{c} P_{x}\\ P_{y} \end{array}\right)\right]\quad0\le t\le1 \tag{EQ 1} \label{EQ 1}$$